/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.dp.vo;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author wyr
 */
@Entity
@Table(name = "song_territoryclearances")
//@NamedQueries({@NamedQuery(name = "SongTerritoryclearances.findAll", query = "SELECT s FROM SongTerritoryclearances s"), @NamedQuery(name = "SongTerritoryclearances.findByTerritoryClearanceId", query = "SELECT s FROM SongTerritoryclearances s WHERE s.territoryClearanceId = :territoryClearanceId"), @NamedQuery(name = "SongTerritoryclearances.findByTerritory", query = "SELECT s FROM SongTerritoryclearances s WHERE s.territory = :territory"), @NamedQuery(name = "SongTerritoryclearances.findBySongId", query = "SELECT s FROM SongTerritoryclearances s WHERE s.songId = :songId"), @NamedQuery(name = "SongTerritoryclearances.findByIsrc", query = "SELECT s FROM SongTerritoryclearances s WHERE s.isrc = :isrc"), @NamedQuery(name = "SongTerritoryclearances.findByClearanceType", query = "SELECT s FROM SongTerritoryclearances s WHERE s.clearanceType = :clearanceType"), @NamedQuery(name = "SongTerritoryclearances.findBySellableDate", query = "SELECT s FROM SongTerritoryclearances s WHERE s.sellableDate = :sellableDate"), @NamedQuery(name = "SongTerritoryclearances.findByCleared", query = "SELECT s FROM SongTerritoryclearances s WHERE s.cleared = :cleared"), @NamedQuery(name = "SongTerritoryclearances.findByMatched", query = "SELECT s FROM SongTerritoryclearances s WHERE s.matched = :matched"), @NamedQuery(name = "SongTerritoryclearances.findByClearanceSource", query = "SELECT s FROM SongTerritoryclearances s WHERE s.clearanceSource = :clearanceSource"), @NamedQuery(name = "SongTerritoryclearances.findByDistributorTrackId", query = "SELECT s FROM SongTerritoryclearances s WHERE s.distributorTrackId = :distributorTrackId")})
public class SongTerritoryclearances implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "territoryClearanceId")
    private Integer territoryClearanceId;
    @Basic(optional = false)
    @Column(name = "territory")
    private String territory;
    @Column(name = "songId")
    private Integer songId;
    @Column(name = "isrc")
    private String isrc;
    @Basic(optional = false)
    @Column(name = "clearanceType")
    private String clearanceType;
    @Basic(optional = false)
    @Column(name = "sellableDate")
    @Temporal(TemporalType.DATE)
    private Date sellableDate;
    @Basic(optional = false)
    @Column(name = "cleared")
    private char cleared;
    @Basic(optional = false)
    @Column(name = "matched")
    private char matched;
    @Column(name = "clearanceSource")
    private String clearanceSource;
    @Column(name = "distributorTrackId")
    private String distributorTrackId;

    public SongTerritoryclearances() {
    }

    public SongTerritoryclearances(Integer territoryClearanceId) {
        this.territoryClearanceId = territoryClearanceId;
    }

    public SongTerritoryclearances(Integer territoryClearanceId, String territory, String clearanceType, Date sellableDate, char cleared, char matched) {
        this.territoryClearanceId = territoryClearanceId;
        this.territory = territory;
        this.clearanceType = clearanceType;
        this.sellableDate = sellableDate;
        this.cleared = cleared;
        this.matched = matched;
    }

    public Integer getTerritoryClearanceId() {
        return territoryClearanceId;
    }

    public void setTerritoryClearanceId(Integer territoryClearanceId) {
        this.territoryClearanceId = territoryClearanceId;
    }

    public String getTerritory() {
        return territory;
    }

    public void setTerritory(String territory) {
        this.territory = territory;
    }

    public Integer getSongId() {
        return songId;
    }

    public void setSongId(Integer songId) {
        this.songId = songId;
    }

    public String getIsrc() {
        return isrc;
    }

    public void setIsrc(String isrc) {
        this.isrc = isrc;
    }

    public String getClearanceType() {
        return clearanceType;
    }

    public void setClearanceType(String clearanceType) {
        this.clearanceType = clearanceType;
    }

    public Date getSellableDate() {
        return sellableDate;
    }

    public void setSellableDate(Date sellableDate) {
        this.sellableDate = sellableDate;
    }

    public char getCleared() {
        return cleared;
    }

    public void setCleared(char cleared) {
        this.cleared = cleared;
    }

    public char getMatched() {
        return matched;
    }

    public void setMatched(char matched) {
        this.matched = matched;
    }

    public String getClearanceSource() {
        return clearanceSource;
    }

    public void setClearanceSource(String clearanceSource) {
        this.clearanceSource = clearanceSource;
    }

    public String getDistributorTrackId() {
        return distributorTrackId;
    }

    public void setDistributorTrackId(String distributorTrackId) {
        this.distributorTrackId = distributorTrackId;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (territoryClearanceId != null ? territoryClearanceId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof SongTerritoryclearances)) {
            return false;
        }
        SongTerritoryclearances other = (SongTerritoryclearances) object;
        if ((this.territoryClearanceId == null && other.territoryClearanceId != null) || (this.territoryClearanceId != null && !this.territoryClearanceId.equals(other.territoryClearanceId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.dp.vo.SongTerritoryclearances[territoryClearanceId=" + territoryClearanceId + "]";
    }

}
